//
//  BJWebView.m
//  SZBank
//
//  Created by rimi on 16/7/19.
//  Copyright © 2016年 LuoYao. All rights reserved.
//

#import "BJWebView.h"

@interface BJWebView ()<UIWebViewDelegate>

@end
@implementation BJWebView

#pragma mark -- 初始化
- (instancetype)initWithFrame:(CGRect)frame withHTMLString:(NSString *)HTMLString
{
    self = [super initWithFrame:frame];
    if (self) {
        self.delegate = self;
        self.scrollView.bounces = NO;
        self.scrollView.showsVerticalScrollIndicator = YES;
        [self loadHTMLString:HTMLString baseURL:nil];
    }
    return self;
}
#pragma mark -- UIWebViewDelegate
// 是否允许开始加载
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
    return YES;
}
-(void)webViewDidFinishLoad:(UIWebView *)webView
{
    //修改webView显示内容的字体大小
    [webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '120 %'"];//修改百分比即可
}
#pragma mark -- CustomerNavigationBarsDelegate
- (void)customeNavigationBarView:(CustomerNavigationBars *)customeNavigationBarView didSelectButton:(UIButton *)didSelectButton{
    
}

@end
